package org.tinygroup.fizzbuzzwhizz;

/**
 * Created by luoguo on 2014/5/6.
 */
public class MultipleNumberReader extends AbstractNumberReader {
    private String title;
    private int dividend;

    public MultipleNumberReader(int priority,int dividend, String title) {
        super(priority, false);
        this.dividend = dividend;
        this.title = title;
    }

    public boolean read(int number) {
        if (number % dividend == 0) {
            System.out.print(title);
            return true;
        }
        return false;
    }
}
